package com.handinglian.employee.mapper;

import com.handinglian.employee.entity.Extension;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Collection;
import java.util.List;

@Mapper
public interface ExtensionMapper {
    int deleteByPrimaryKey(Integer extensionId);

    int insert(Extension record);

    int insertOrUpdate(Extension record);

    int insertOrUpdateSelective(Extension record);

    int insertSelective(Extension record);

    Extension selectByPrimaryKey(Integer extensionId);

    int updateByPrimaryKeySelective(Extension record);

    int updateByPrimaryKey(Extension record);

    int updateBatch(List<Extension> list);

    int batchInsert(@Param("list") List<Extension> list);

    List<Extension> find();

    int deleteByExtenNoIn(@Param("extenNoCollection") Collection<String> extenNoCollection);

    Extension findFirstByUserIdIsNull();

    int updateUserIdByUserId(@Param("updatedUserId")Integer updatedUserId,@Param("userId")Integer userId);

    Integer countByUserIdIsNull();

    Extension findOneByUserId(@Param("userId")Integer userId);

    List<Extension> findByExtenNoIn(@Param("extenNoCollection")Collection<String> extenNoCollection);

    int updateUserIdByUserIdIsNull(@Param("updatedUserId")Integer updatedUserId);

}